<!-- To create a popup from a databases field that contains only one instance of an item, 
although that item may be present in multiple records-->
[Inline:
	-Database='cities',
	-Table='list',
	-Op='gte',
	'item'='a',
	-sortField='item',
	-Search]

	[Var:'previous'='']
	[records]
		[If:(Field:'item')!=(Var:'previous')]
  			[List_AddItem:'ItemsList', (Field:'item')]
  			[Var:'previous'=(Field:'item')]
		[/If]
	[/records]

[/inline]

<!--To construct the select:-->

<select name="item">
	<option value="">--- make selection --
	[If:(List_ItemCount:'ItemsList')>0]
		[Loop:(List_ItemCount:'ItemsList')]
			<option value="[List_GetItem:'ItemsList',-ListIndex=(Loop_Count)]">[List_GetItem:'ItemsList',-ListIndex=(Loop_Count)]
		[/Loop]
	[/If]
</select>